<template>
  <div id="app" class="container">
    <img alt="Vue logo" src="./assets/logo.png" />
    <input v-model="inputText" placeholder="请输入内容" />
    <div class="output-box">{{ inputText }}</div>
    <button @click="clearInput">清空</button>
  </div>
</template>

<script>
export default {
  name: 'HelloWorld',
  data() {
    return {
      inputText: ''
    };
  },
  methods: {
    clearInput() {
      this.inputText = '';
    }
  }
};
</script>

<style scoped>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

input {
  margin: 10px;
  padding: 8px;
  font-size: 16px;
  width: 60%;
}

.output-box {
  margin: 10px;
  padding: 8px;
  font-size: 16px;
  width: 60%;
  border: 1px solid #ccc;
  min-height: 40px;
  text-align: left;
}

button {
  padding: 10px 20px;
  margin-top: 10px;
  font-size: 16px;
}
</style>


